Repository navigation
feat(claude): hide and deprecate depot claude (DEP-8856) - #708
Conversation
Remote Agents is deprecated in favor of Depot Managed Agents. Hide the command from help and completion and print a deprecation notice on stderr. The command keeps working: customers still use it and the API boots every Remote Agent sandbox with `depot claude`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Note
🤖 Cursor Grok 4.6 responding on behalf of the Cursor Approval Agent
Risk: low. Approved after Cursor Bugbot passed with no findings that need human review. The change only hides and deprecates depot claude while leaving the command registered and executable.
Sent by Cursor Approval Agent: Pull Request Router and Approver
…856) cobra's Deprecated prints via OutOrStderr, which is docker's stdout when depot runs as a Docker CLI plugin. Print the notice to ErrOrStderr in RunE instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
LGTM. The follow-up commit fixes the Docker-plugin stdout issue I raised earlier: it drops cobra's Deprecated field and writes the notice with cmd.ErrOrStderr().
What was reviewed:
pkg/cmd/claude/claude.go:Hidden: true, and the notice is printed at the top of RunE. That covers thelist-sessions,secretsand default paths, and the dispatch logic is unchanged.pkg/cmd/root/root_test.go: the new test covers hiding from--helpand__complete, lookup withcmd.Find, and the notice going to stderr.
Extended reasoning...
The change touches two files: it hides the depot claude cobra command, prints a one-line deprecation notice to stderr in its RunE, and adds a root-level test. It touches no auth, crypto or data-exposure surface, and command execution is otherwise unchanged. My only earlier concern, that the notice could reach stdout in Docker-plugin mode, was fixed in commit c85174d. There is no CODEOWNERS file, and no other reviewer has an open objection.


Summary
depot claudetakes a quiet bow: gone from help and completion, still works, and tells you where to go next.What was happening
Remote Agents (Claude) is deprecated in favor of Depot Managed Agents, but
depot --helpand shell completion still advertiseddepot claudewith no hint of that.What happens now
The command is
Hiddenand prints one line to stderr at the start of itsRunE, then runs as before:Before/after with built binaries:
depot --help | grep -i claudeclaude Run claude with automatic session persistencedepot __complete ""claudeclaudedepot claude --helpstderrdepot claude list-sessions --helpstdoutc5c441c6…c5c441c6…(identical)depot claude --helpstdout07e67c81…07e67c81…(identical)depot claude secretsstdout1d1b31ed…1d1b31ed…(identical)It writes to
cmd.ErrOrStderr()instead of using cobra'sDeprecated, becauseDeprecatedprints viaOutOrStderr(), which is docker's stdout when depot runs as a Docker CLI plugin (docker depot claude … --output json). It prints onlist-sessionsandsecretstoo, since those dispatch through theclaudecommand'sRunE.Anything else?
This hides and warns instead of removing the command (what the ticket asks). 16 external orgs ran
depot claudethis month, and the API boots every Remote Agent sandbox by runningdepot claude --org … --token … --session-id …inside it, so deleting it would break customers and our own sandboxes on the next base-image bump. Full removal waits until the server stops callingdepot claude.Fixes DEP-8856
🤖 Generated with Claude Code
Note
Low Risk
Visibility and messaging only; command execution and stdout output paths are preserved and covered by tests.
Overview
depot claudeis hidden from public help and shell completion but remains registered and behaviorally unchanged for callers that invoke it directly (including existing sandboxes).On every run, the command prints a custom deprecation line to stderr pointing users to Depot Managed Agents, deliberately not using Cobra’s
Deprecatedfield so the notice does not land on stdout when the CLI runs as a Docker plugin.A new root test asserts
claudeis absent from--helpand completion, still discoverable viaFind, and that the deprecation message appears only on stderr (stdout stays clean for scripted output).Reviewed by Cursor Bugbot for commit c85174d. Bugbot is set up for automated code reviews on this repo. Configure here.